package com.ruoyi.level.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.level.mapper.TVehicleLevelMapper;
import com.ruoyi.level.domain.TVehicleLevel;
import com.ruoyi.level.service.ITVehicleLevelService;

/**
 * 车辆级别Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-26
 */
@Service
public class TVehicleLevelServiceImpl implements ITVehicleLevelService 
{
    @Autowired
    private TVehicleLevelMapper tVehicleLevelMapper;

    /**
     * 查询车辆级别
     * 
     * @param levelId 车辆级别主键
     * @return 车辆级别
     */
    @Override
    public TVehicleLevel selectTVehicleLevelByLevelId(Long levelId)
    {
        return tVehicleLevelMapper.selectTVehicleLevelByLevelId(levelId);
    }

    /**
     * 查询车辆级别列表
     * 
     * @param tVehicleLevel 车辆级别
     * @return 车辆级别
     */
    @Override
    public List<TVehicleLevel> selectTVehicleLevelList(TVehicleLevel tVehicleLevel)
    {
        return tVehicleLevelMapper.selectTVehicleLevelList(tVehicleLevel);
    }

    /**
     * 新增车辆级别
     * 
     * @param tVehicleLevel 车辆级别
     * @return 结果
     */
    @Override
    public int insertTVehicleLevel(TVehicleLevel tVehicleLevel)
    {
        return tVehicleLevelMapper.insertTVehicleLevel(tVehicleLevel);
    }

    /**
     * 修改车辆级别
     * 
     * @param tVehicleLevel 车辆级别
     * @return 结果
     */
    @Override
    public int updateTVehicleLevel(TVehicleLevel tVehicleLevel)
    {
        tVehicleLevel.setUpdateTime(DateUtils.getNowDate());
        return tVehicleLevelMapper.updateTVehicleLevel(tVehicleLevel);
    }

    /**
     * 批量删除车辆级别
     * 
     * @param levelIds 需要删除的车辆级别主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleLevelByLevelIds(Long[] levelIds)
    {
        return tVehicleLevelMapper.deleteTVehicleLevelByLevelIds(levelIds);
    }

    /**
     * 删除车辆级别信息
     * 
     * @param levelId 车辆级别主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleLevelByLevelId(Long levelId)
    {
        return tVehicleLevelMapper.deleteTVehicleLevelByLevelId(levelId);
    }
}
